#ifndef THEMECONTROLLER_H
#define THEMECONTROLLER_H

#include <QGSettings/QGSettings>
#include <QPushButton>

static const QByteArray FITTHEMEWINDOW =  "org.ukui.style";

enum ThemeFlag
{
    LightTheme,
    DarkTheme
};

enum IconFlag
{
    DefaultStyle,
    ClassicStyle
};

enum WidgetThemeFlag
{
    DefaultTheme, //寻光
    ClassicTheme, //启典
    FashionTheme  //和印
};

class ThemeController
{

public:
    static QPixmap drawSymbolicColoredPixmap(const QPixmap &source);
    static QPixmap drawColoredPixmap(const QPixmap &source,const QColor &sampleColor);
    static QColor getCurrentIconColor();
    static QColor mixColor(const QColor &c1, const QColor &c2, qreal bias = 0.5);
    static WidgetThemeFlag widgetTheme();
    static ThemeFlag themeMode();
    static IconFlag iconTheme();
    static int systemFontSize();
    static QPixmap drawFashionBackground(const QRect&rect,int sub_width,int sub_height,int radius,int flag); // flag ? rightBottom : leftBottom;
    static bool isPixmapPureColor(const QPixmap &pixmap) ;
    ThemeController();
    ~ThemeController();

    virtual void changeTheme(){}
    virtual void changeIconStyle(){}
    void initThemeStyle();

    QGSettings *m_gsetting;
    //unused
    ThemeFlag m_themeFlag;
    IconFlag m_iconFlag;
};

#endif // THEMECONTROLLER_H
